﻿//
// Copyright (c) Fabien Lavocat (http://www.blog-microsoft.fr)
// 
// The latest version of this file can be found at http://twostatesbutton.codeplex.com/
//

using System;
using System.Windows;
using System.Windows.Controls.Primitives;

namespace Wpf.Controls
{

    public partial class MyToggleButton : ToggleButton
    {
        public MyToggleButton()
        {
            InitializeComponent();
        }

        #region Displayed values

        public String Left
        {
            get { return (String)GetValue(LeftProperty); }
            set { SetValue(LeftProperty, value); }
        }

        // Using a DependencyProperty as the backing store for LeftValue.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty LeftProperty =
            DependencyProperty.Register("Left", typeof(String), typeof(MyToggleButton), new UIPropertyMetadata("ON"));

        public String Right
        {
            get { return (String)GetValue(RightProperty); }
            set { SetValue(RightProperty, value); }
        }

        // Using a DependencyProperty as the backing store for RightValue.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty RightProperty =
            DependencyProperty.Register("Right", typeof(String), typeof(MyToggleButton), new UIPropertyMetadata("OFF"));

        #endregion

    }
}